﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="FL.Web.BackEnd.DataGrid" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<script src="../../sframework/boot.js"></script>
<body style="margin: 0px; padding: 0px">
    <form id="form1" runat="server">
        <div style="width: 100%; height: 100%">
            <div class="mini-toolbar" style="border-bottom: 0; padding: 0px;">
                <table style="width: 100%;">
                    <tr>
                        <td style="width: 100%;">
                                <a class="mini-button" iconcls="icon-ok" plain="true" onclick="onOk()">确定</a>
                               <a class="mini-button" iconcls="icon-cancel" plain="true" onclick="onCancel()">取消</a>
                        </td>
                        <td style="white-space: nowrap;">
                            <input type="checkbox" id="checkAndOr" /><span style="margin-top: -5px;">并集</span>
                            <input id="QueryContext" type="text" />
                            <a class="mini-button" onclick="fnQuciklyQuery()">查询</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="datagrid1" class="mini-datagrid" pagesize="500" allowresize="true" allowscroll="true"  allowcellselect="<%=AllowEdit.ToString().ToLower()%>" multiselect="true"
            editnextonenterkey="true" editnextrowcell="true" idfield="id" multiselect="true" url="../data/jsondata.aspx?entity=<%=EntityName%>&condition=<%=Condition %>&order=<%=Order%>&desc=<%=GetStringFromQueryString("desc","Yes") %>&datagrid=true" pagesize="100">
            <div property="columns">
                <div type="checkcolumn" width="25"></div>
                <%=DataFields %>
                <%--<div field="group_id" width="120" type="comboboxcolumn" headeralign="center" allowsort="true">
                            类型
                    <input property="editor" class="mini-combobox" style="width:100%;" data="FeeType" />
                </div>--%>
            </div>

        </div>
    </form>
</body>
<script type="text/javascript">
    const_entityID = "<% =EntityId %>",    //实体ID名称
    const_entityName = "<% =EntityName %>",//实体名称
    const_EditEntity = "<% =EditEntity %>",//编辑实体名
    const_functionId   ="<% =FunctionID %>",//自定义条件
    const_Order ="<% =Order %>",           //排序  
    const_UserId = "<% = UserId %>",       // 


    const_TreeCustomCondition = "";        //主从关系条件 
    const_QueryField="<% =QuciklyQueryFields %>",
    const_CustomCondition = encodeURI("<% =DefineCondition %>"),//查询方案条件
    const_Condition = encodeURI("<% =Condition %>"),//
    const_PageTitle=encodeURI("<% =PageTitle %>"),
    _openWindowHeight=<%=EditWindowHeight%>,
    _openWindowWidth=<%=EditWindowWidth%>;

    <% =ColumnDataSource%>
    
</script>
<script>
    <% =List_self_script %>
</script>
<script type="text/javascript">

    $("#datagrid1").width($(document).width());
    $("#datagrid1").height($(document).height() - 32);
      
    mini.parse();
    var grid= mini.get("datagrid1")
    grid.load({},fnDataBinding);
   
    //////////////////////////////////
    function CloseWindow(action) {
        if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
        else window.close();
    }

    function fnGetData(){
        return grid.getSelecteds();
    }

    var _data = null;
    function fnSetData(data) {
        _data = data;
    }

    function fnDataBinding(){
        grid.selects(_data, true )
    }

    function onOk() {
        CloseWindow("ok");        
    }
    function onCancel() {
        CloseWindow("cancel");
    }
</script>
<script src="../../Scripts/common/jquery.action.js"></script>
<script src="../../Scripts/datagrid/list.common.button.js"></script>
</html>
